<% spinner = "#{model}_form_spinner" %>
<% button  = "#{model}_accept_button" %>
<% options.reverse_merge! :header => false, :remote => true,
              :controller_name => controller.controller_name,
              :loading =>  "Element.show('#{spinner}'); $('#{button}').disabled = true;",
              :complete => "Element.hide('#{spinner}'); $('#{button}').disabled = false;",
              :html => {:id => "#{model}_form"}
 %>
<% inline_form_for model, current, options do |f| %>
  <%= render :partial => "#{options[:controller_name]}/form", :object => f %>
  <%= f.actions :remote => true, :delete => f.options[:form_action] == :edit %>
<% end %>
